import 'package:bloc/bloc.dart';

import 'event.dart';
import 'state.dart';

class LoaginBloc extends Bloc<LoaginEvent, LoaginState> {
  LoaginBloc() : super(LoaginState().init());

  @override
  Stream<LoaginState> mapEventToState(LoaginEvent event) async* {
    if (event is InitEvent) {
      yield await init();
    }
  }

  Future<LoaginState> init() async {
    return state.clone();
  }
}
